package com.xhtt.modules.cfg.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xhtt.common.utils.PageUtils;
import com.xhtt.common.utils.Query;
import com.xhtt.modules.cfg.dao.CfgWarnShipMapper;
import com.xhtt.modules.cfg.entity.CfgWarnShip;
import com.xhtt.modules.cfg.service.CfgWarnShipService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by xj
 * 2019/05/24 11:05
 **/
@Service
public class CfgWarnShipServiceImpl extends ServiceImpl<CfgWarnShipMapper, CfgWarnShip> implements CfgWarnShipService {

    @Override
    public PageUtils shipList(Map<String, Object> params) {
        Page<CfgWarnShip> page = new Query<CfgWarnShip>(params).getPage();
        List<CfgWarnShip> list = baseMapper.shipList(page, params);
        page.setRecords(list);
        return new PageUtils(page);
    }
}
